﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PMCgui
{
    public class TransitionUserControl : UserControl, ITransitionable
    {
        #region Implementation of ITransitionable

        public virtual void Transition(Control c, Panel panel, bool updateLayout = false)
        {
            var parent = Parent;
            while (parent != null)
            {
                if (parent is ITransitionable)
                {
                    (parent as ITransitionable).Transition(c, panel, updateLayout);
                    break;
                }
                parent = parent.Parent;
            }
        }

        #endregion
    }
}
